<template>
	<view class="container">
		<nav-bar class="header" title="光路详情" @goBack="goBack">
		</nav-bar>
		<!-- 上半部分 -->
		<view class="site-detail">
			<van-form>
			  <van-field v-model="params.name||'--'" :colon="true" type='textarea' rows="1" autosize disabled label="光路名称" input-align="right"/>
			    <van-field v-model="params.rate||'--'" :colon="true" type='textarea' rows="1" autosize disabled label="带宽" input-align="right"/>
			  <van-field v-model="params.dispatchinglevelName||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="调度等级" input-align="right"/>
			  <van-field v-model="params.strategy||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="光路保护策略" label-width='90px' input-align="right"/>
			  <van-field v-model="params.isOlp||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="是否外置OLP" input-align="right"/>
			  <van-field v-model="params.mainPrepareName||'--'
"  :colon="true" type='textarea' rows="1" autosize disabled label="主备光路" input-align="right"/>
			  <van-field v-model="params.ticket||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="方式票" input-align="right"/>
			  <van-field v-model="params.xxway||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="纤芯方式" input-align="right"/>
			  <van-field v-model="params.astationName||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="起始站点" input-align="right"/>
			  <van-field v-model="params.aequName||'--'" :colon="true" type='textarea' rows="1" autosize disabled label="起始设备" input-align="right"/>
			  <van-field v-model="params.aport||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="起始端口" input-align="right"/>
			  <van-field v-model="params.zstationName||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="终止站点" input-align="right"/>
			  <van-field v-model="params.zequName||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="终止设备" input-align="right"/>
			  <van-field v-model="params.zport||'--'"  :colon="true" type='textarea' rows="1" autosize disabled label="终止端口" input-align="right"/>
			</van-form>
		</view>
	
	</view>
</template>

<script>
	import navBar from "../../../../components/common/nav-bar.vue";
	import standingCell from "../../../../components/standingBookComponents/cell/cell.vue"
	import {
		getListOfDeviceDetail
	} from "../../../../api/ydtzApi.js"
	export default {
		data() {
			return {
				params:{}
			}
		},
		components: {
			navBar,
			standingCell
		},
		onLoad(option){
			this.getListOfDeviceDetail(option)
		},
		methods: {
			goBack() {
				uni.navigateBack()
			},
			// 获取详情
			getListOfDeviceDetail(option) {
				this.$apiRequest.ydtzApi.getListOfDeviceDetail({
					objId: option.objId,
				}).then(({
					data: res
				}) => {
					this.params = res
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #f2f6fa;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
	}
	.container{
		padding-bottom: px2vh(30);
	}
	.header {
		position: sticky;
		top: 0;
		z-index: 999;
	}
	.site-detail {
	  width: calc(100vw - #{px2vw(60)});
	  background: #fff;
	  border-radius: px2vw(20);
	  margin:px2vh(30) auto;
	 ::v-deep .van-field__control:disabled {
	 	-webkit-text-fill-color: #333;
		font-family: Microsoft YaHei, Microsoft YaHei-Regular;
	 }
	}
	.card-title{
		text-align: center;
		color: #1684FC;
		font-weight: 600;
		font-size: px2vh(42);
		line-height: px2vh(82);
		span{
			display: inline-block;
			border-bottom: px2vh(6) solid #1684FC;
		}
	}
	
</style>